$NG.AllReady(
    //表头页面逻辑
    function (page, { useAction, useDataIndexChange, useUpdateRow, useUpdateRows }) {
      const mstform = $NG.getCmpApi("p_form_pc_stakeholders_m");
      const dgrid = $NG.getCmpApi("p_form_pc_stakeholders_d");
      console.log("page is ready");
      if (dgrid) {
        // 实现对表体单元格设置必输和只读
        dgrid.subscribe(({ dataIndex, row }) => {
          xb = "null";
          if (dataIndex == "u_source") {
            xb = dataIndex;
          }
          console.log(dgrid.getChange());
        }, "startEditing");
  
        dgrid.subscribe(({ dataIndex, row }) => {
          console.log(dataIndex, row);
          var u_source = "SD";
          u_source = dgrid.getRows()[dgrid.getCheckedIndexes()[0]].u_source;
          if (u_source != "SD") {
            dgrid.endEditing();
            $NG.alert("只有干系人来源为SD的项目干系人才能进行编辑");
          }
        }, "onCheckedChange");
      }
      useUpdateRows(({args})=>{
        const _arr = dgrid.getRows()
        _arr.forEach(element => {
            if(element.u_source == ""||element.u_source == undefined){
                element.u_source = "SD"
            }
        });
        dgrid.refreshView()
      },"p_form_pc_stakeholders_d")
    },
    //编辑页面逻辑
    function (editPage, { useAction }) {
      console.log("editPage is ready");
      const listToolbar = $NG.getCmpApi("toolbar");
      listToolbar.getItem("add").setHidden();
    },
    //列表页面逻辑
    function (listPage, { useAction }) {
      console.log("listPage is ready");
    }
  );
  